const {defineConfig} = require('@vue/cli-service')

const port = 8080
// const host = "http://localhost:8081"
const host = "http://localhost:8001"
module.exports = defineConfig({
  devServer: {
    host: 'localhost',
    port: port,
    open: true,
    proxy: {
      '/code': {
        target: host,
        changeOrigin: true,
        pathRewrite: {
          '^/code': ''
        }
      },
      '/auth': {
        target: host,
        changeOrigin: true,
        pathRewrite: {
          '^/auth': '/auth'
        }
      },
      '/api': {
        target: host,
        changeOrigin: true,
        pathRewrite: {
          '^/api': ''
        }
      }
    }
  }
})
